package com.example.scale;

import org.andengine.engine.camera.Camera;
import org.andengine.entity.scene.Scene;
import org.andengine.entity.scene.menu.item.IMenuItem;
import org.andengine.entity.sprite.Sprite;
import org.andengine.entity.sprite.TiledSprite;
import org.andengine.opengl.texture.region.ITextureRegion;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

public class LevelSelectBox extends Sprite implements IMenuItem {

	//private TiledSprite number1;
	private TiledSprite number;
	//private TiledSprite number2;
	
	public LevelSelectBox(float pX, float pY, float pWidth, float pHeight,
			ITextureRegion pTextureRegion,
			VertexBufferObjectManager pSpriteVertexBufferObject) {
		super(pX, pY, pWidth, pHeight, pTextureRegion, pSpriteVertexBufferObject);
		attachNumbers(pSpriteVertexBufferObject);
	}

	public void attachNumbers(
			VertexBufferObjectManager pSpriteVertexBufferObject) {
		//number1 = new TiledSprite(150, 150, ResourcesManager.getInstance().complete_numbers_region, pSpriteVertexBufferObject);
		number = new TiledSprite(325, 500, ResourcesManager.getInstance().complete_numbers_region, pSpriteVertexBufferObject);
		//number2 = new TiledSprite(500, 150, ResourcesManager.getInstance().complete_numbers_region, pSpriteVertexBufferObject);
		
		//attachChild(number1);
		attachChild(number);
		//attachChild(number2);
	}
	
	public void display(int num1, int num2, Scene scene, Camera camera) {
		//number1.setCurrentTileIndex(num1);
		// TODO: CHANGE TO 10
		number.setCurrentTileIndex(2);
		//number2.setCurrentTileIndex(num2);
		
		setPosition(camera.getCenterX(), camera.getCenterY());
		scene.attachChild(this);
	}

	@Override
	public int getID() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void onSelected() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onUnselected() {
		// TODO Auto-generated method stub
		
	}

}
